<?php

namespace app\models\db;

use Yii;

/**
 * This is the model class for table "t_file".
 *
 * @property string $id
 * @property string $name
 * @property string $type
 * @property string $url
 * @property string $size
 * @property string $create_datetime
 */
class File extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_file';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['url'], 'string'],
            [['size'], 'number'],
            [['create_datetime'], 'safe'],
            [['id'], 'string', 'max' => 36],
            [['name', 'type'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Name',
            'type' => 'Type',
            'url' => 'Url',
            'size' => 'Size',
            'create_datetime' => 'Create Datetime',
        ];
    }
}
